Optimal. Leaf size=134 \[ -\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {4 \sin (c+d x)}{21 a^4 d}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3502, 3500, 2633} \[ -\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {4 \sin (c+d x)}{21 a^4 d}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2633
Rule 3500
Rule 3502
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{9 a}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {20 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{63 a^2}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {4 \int \cos ^3(c+d x) \, dx}{21 a^4}\\ &=\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {4 \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{21 a^4 d}\\ &=\frac {4 \sin (c+d x)}{21 a^4 d}-\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 95, normalized size = 0.71 \[ -\frac {i \sec ^4(c+d x) (-42 i \sin (c+d x)-135 i \sin (3 (c+d x))+35 i \sin (5 (c+d x))-168 \cos (c+d x)-180 \cos (3 (c+d x))+28 \cos (5 (c+d x)))}{1008 a^4 d (\tan (c+d x)-i)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 74, normalized size = 0.55 \[ \frac {{\left (-63 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 315 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 126 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 45 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{2016 \, a^{4} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.29, size = 145, normalized size = 1.08 \[ \frac {\frac {63}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {1953 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 9450 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 25998 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 42210 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 46368 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 33054 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15858 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4374 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 703}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{9}}}{1008 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 174, normalized size = 1.30 \[ \frac {\frac {2}{32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 i}+\frac {86 i}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{6}}-\frac {8 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{8}}-\frac {49 i}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {49 i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}+\frac {16}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{9}}-\frac {132}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{7}}+\frac {31}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {173}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {31}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{d \,a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.41, size = 161, normalized size = 1.20 \[ \frac {\left (63\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,252{}\mathrm {i}-588\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,672{}\mathrm {i}+378\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,168{}\mathrm {i}+372\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,288{}\mathrm {i}-97\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+20{}\mathrm {i}\right )\,2{}\mathrm {i}}{63\,a^4\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.64, size = 233, normalized size = 1.74 \[ \begin {cases} \frac {\left (- 1585446912 i a^{20} d^{5} e^{26 i c} e^{i d x} + 7927234560 i a^{20} d^{5} e^{24 i c} e^{- i d x} + 5284823040 i a^{20} d^{5} e^{22 i c} e^{- 3 i d x} + 3170893824 i a^{20} d^{5} e^{20 i c} e^{- 5 i d x} + 1132462080 i a^{20} d^{5} e^{18 i c} e^{- 7 i d x} + 176160768 i a^{20} d^{5} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{50734301184 a^{24} d^{6}} & \text {for}\: 50734301184 a^{24} d^{6} e^{25 i c} \neq 0 \\\frac {x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 9 i c}}{32 a^{4}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________